package com.wz.customerserv.controller;


import com.wz.customerserv.service.CustomerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("customer")
public class CustomerController {
    @Autowired
    private CustomerService customerService;

    @GetMapping("/changeValue")
    public String changeValue(@RequestParam("name") String name){
        return customerService.changeValue(name);
    }

    @GetMapping("/testHystrix")
    public String testHystrix(@RequestParam("name") String name){
        return customerService.testHystrix(name);
    }

}
